﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Model;
using DAL;


namespace BLL
{
    public class InterviewBLL
    {
        InterviewDAL dal = new InterviewDAL();
        /// <summary>
        /// 面试表显示数据
        /// </summary>
        /// <returns></returns>
        public pageLibrary<Interview> GetInter(int pageindex, int pagesize, string interview_data)
        {
            pageLibrary<Interview> page = new pageLibrary<Interview>();
            page.Data = dal.GetInter(pageindex, pagesize, interview_data);
            page.PageCount = dal.countinter(interview_data);
            page.PageIndex=pageindex;
            page.PageSize=pagesize;
            return page;
        }
        /// <summary>
        /// 面试表添加数据
        /// </summary>
        /// <param name="m">面试表</param>
        /// <returns></returns>
        public int SetInter(Interview Interview)
        {
            return dal.SetInter(Interview);
        }     
        /// <summary>
        /// 面试表删除数据
        /// </summary>
        /// <param name="m">面试表ID</param>
        /// <returns></returns>
        public int DelInter(int id)
        {
            return dal.DelInter(id);
        }
           /// <summary>
        /// 根据ID显示数据
        /// </summary>
        /// <returns></returns>
        public List<Interview> GetInterUpdate(int id)
        {
            return dal.GetInterUpdate(id);
        }
        /// <summary>
        /// 面试表修改数据
        /// </summary>
        /// <param name="m">面试表</param>
        /// <returns></returns>
        public int SetInterUpdate(Interview Interview)
        {
            return dal.SetInterUpdate(Interview);
        }
    }
}
